Release 10.1A: OpenEdge Development:
Progress 4GL Reference
ENCODING attribute
Returns the name of the character encoding used to encode the contents of an XML document. The default encoding is UTF-8.
Data type: CHARACTER Access: Readable/Writable Applies to: X-document object handle, SAX-writer object handleFor an X-document object, Progress sets the ENCODING attribute to the encoding name specified in the XML document’s encoding declaration when you load an XML document using the LOAD( ) method.
You can also set the ENCODING attribute to the name of the character encoding to use when saving an XML document using the SAVE( ) method. Progress records this character encoding in the encoding declaration in the XML document’s prologue. If you do not set the ENCODING attribute, when you save the document, the document will not have an encoding declaration in its prologue, but the document will be saved with the default encoding of UTF-8.
For a SAX-writer object, you can set the ENCODING attribute to the name of the character encoding to use when writing the XML document. You can set this attribute only when the WRITE-STATUS is either SAX-WRITE-IDLE or SAX-WRITE-COMPLETE. That is, you can only change this attribute when the writer is not writing, otherwise it fails and generates an error message. Progress records this character encoding in the encoding declaration in the XML document’s prologue. If you do not set the ENCODING attribute, when you write the document, the document will not have an encoding declaration in its prologue, but the document will be written with the default encoding of UTF-8.
The encoding name must be an Internet Assigned Numbers Authority (IANA) name supported by the Progress XML Parser. Table 64 lists the names of the supported IANA encodings and their corresponding Progress code pages.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |